//package com.imooc.flink.basic;
//
//import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
//import org.apache.flink.table.api.Table;
//import org.apache.flink.table.api.bridge.java.StreamTableEnvironment;
//import org.apache.flink.types.Row;
//
///**
// * @author: Chen Yixing
// * @since: 2023/10/31 14:01:20
// * @description:
// */
//public class SQLApp {
//    private final static String TAG = "SQLApp";
//    String targetTable = "t1";
//    String basePath = "hdfs://192.168.197.131:8020/user/hudi/warehouse/hudi_db/t1";
//
//    public static void main(String[] args) throws Exception {
//        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
//
//        StreamTableEnvironment tableEnv = StreamTableEnvironment.create(env);
//        tableEnv.executeSql("CREATE TABLE t1 (\n" +
//                "  id BIGINT,\n" +
//                "  name STRING,\n" +
//                "  PRIMARY KEY (id) NOT ENFORCED\n" +
//                ") WITH (\n" +
//                "   'connector' = 'jdbc',\n" +
//                "   'url' = 'jdbc:mysql://192.168.2.105:3306/gbac',\n" +
//                "   'table-name' = 'ubi_user_info',\n" +
//                "   'username' = 'root',\n" +
//                "   'password' = 'root'\n" +
//                ")");
//        Table table = tableEnv.sqlQuery("select * from t1");
//        tableEnv.toRetractStream(table, Row.class).filter(x -> x.f0).print("row:");
//
//        env.execute(TAG);
//    }
//}
